package com.project.dao;

import com.project.entity.Class;
import com.project.entity.Major;

import java.util.List;

public interface ClassMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Class record);

    int insertSelective(Class record);

    Class selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Class record);

    int updateByPrimaryKey(Class record);

    /**
     * author: WheelChen
     * date: 2017/7/13
     * function: 根据专业id批量查找班级
     *
     * @param majorid 专业表id
     * @return
     */
    List<Class> selectByMajorid(Integer majorid);

    /**
     * author: WheelChen
     * date: 2017/7/25
     * function: 根据学院id批量查找班级
     *
     * @param schoolId 学院id
     * @return
     */
    List<Class> selectBatchBySchoolId(Integer schoolId);

    /**
     * author: WheelChen
     * date: 2017/8/10
     * function: 检查班级是否已存在
     *
     * @param clazz
     * @return 0 - 不存在 大于0存在
     */
    int checkClassIsExist(Class clazz);
}